package com.xdf.data_transmitter.service;

import com.xdf.data_transmitter.dao.erp.GPrintingdyeingnameMapper;
import com.xdf.data_transmitter.model.GPrintingdyeingname;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GPrintingdyeingnameServiceImpl implements GPrintingdyeingnameService {
    @Autowired
    private GPrintingdyeingnameMapper dao;

    @Override
    public String getMillName() {
        String anonymous = "匿名染厂";
        List<GPrintingdyeingname> list = dao.selectMillName();
        if( list == null || list.size()<=0 ) return anonymous;
        String millName = list.get(0).getB_Name();
        return millName == null?anonymous:millName;
    }
}
